/*******************************************\
|					    |
| This displays the Easy Level high scores  |
|					    |
| Status: Unfinished. Cannot write new high |
| score to file.			    |
| 					    |
\*******************************************/

#include <ncurses.h>
#include <stdio.h>
#include <string.h>


int main()
{
	int i, j;
	FILE *easy;

	initscr();
	cbreak();
	keypad(stdscr, TRUE);
	noecho();
	curs_set(0);

	clear();
	
	mvprintw(getmaxx(stdscr), 2, "HIGH SCORES");
	mvprintw(getmaxx(stdscr), 3, "LEVEL: EASY");
	refresh();

	move(5, 1);

	FILE *fp;
	int x;

	fp = fopen("/home/students/j.pitel/the_Commuter/highscore_list_e.txt", "r");

	while((x = fgetc(fp)) != EOF)
	{
		putchar(x);
		if(x == '\n')
			move(6, 1);
	}	

	fclose(fp);

/* The following is code that is not in use but I don't want to get rid of
   quite yet.
*/
/*	if(easy = fopen("/home/students/j.pitel/the_Commuter/highscore_list_e", "w"))
	{
		fprintf(easy,
	}

	for(i = 0; i < 20; i++)
	{
		for(j = 0; j < 2; j++)
		{
//			if(*e_high_score[i][j] == NULL)
//				*e_high_score[i][j] = {"---------"};
			mvprintw(5, i+5, "%s", e_high_score[i][j]);
			printw("\t\t");
			refresh();
		}		
	}
*/

	refresh();
	
	sleep(10);
	endwin();

	return;
}
